package com.ddwl.schema.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;


/**
 * @author FuZhaohui
 */
@Setter
@Getter
@Accessors(chain = true)
@NoArgsConstructor
@ApiModel("定位")
public class Location {

    @NotNull(message = "经度为空")
    @ApiModelProperty("经度")
    private Double lng;
    @NotNull(message = "纬度为空")
    @ApiModelProperty("纬度")
    private Double lat;
    @ApiModelProperty("楼层")
    private Integer floor;
    @ApiModelProperty("精度")
    private Float precision;
    @ApiModelProperty("角度")
    private Float angle;
    @ApiModelProperty("详细地址")
    private String address;
    @ApiModelProperty("区域ID")
    private String regionId;

    public Location(Double lng, Double lat) {
        this.lng = lng;
        this.lat = lat;
    }
}
